package com.dhu.demo.mapper;

import com.dhu.demo.entity.Student;
import com.dhu.demo.entity.StudentWithScore;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface StudentMapper {
    List<Student> findAll();

    int deleteByPrimaryKey(Integer studentNumber);

    int insert(Student record);

    int insertSelective(Student record);

    Student selectByPrimaryKey(Integer studentid);

    //查找用户信息
    Student selectByStudentNumber(Integer studentNumber);

    int updateByPrimaryKeySelective(Student record);


    int updateByPrimaryKey(Student record);

    List<StudentWithScore> selectAllInfoAndScoreByScore(int score);
    List<StudentWithScore> selectAllInfoAndScoreByClassnameAndGrade(StudentWithScore studentWithScore);
    List<StudentWithScore> selectScoreMapByClassNumber(String department,String major,String classnumber);
    List<StudentWithScore> selectScoreMapByDepartment(String department);
    List<StudentWithScore> selectScoreMapByMajor(String department,String major);
    List<StudentWithScore> selectScoreMapByClassName(String classname);
}